#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "definition.h"


definition* creerDefinition(int niveau, prop* p)
{
	definition* d = (definition*)malloc(sizeof(definition));
	d -> niveau = niveau;
	d -> proprietes = p;
	return d;
}

definition* supprimerDefinition(definition* def)
{
	if(def)
	{
		if(def->proprietes)
			def->proprietes = supprimerPropriete(def->proprietes);
        free(def);
		def = NULL;
	}
	//else fprintf(stderr, "pointeur null *def\n" );
	return def;
}
